#!/bin/bash
#
make distclean >/dev/null
rm -rf release
mkdir -p release/Xsaitekpanels/64 &&
qmake -spec win32-g++ && qmake -set CROSS_COMPILE x86_64-w64-mingw32- && make &&
cp plugin/release/win.xpl1.dll release/Xsaitekpanels/64/win.xpl
if [ $? != 0 ] ; then
  exit
fi

make distclean >/dev/null
qmake -spec win32-g++ && qmake -set CROSS_COMPILE i686-w64-mingw32- && make &&
cp plugin/release/win.xpl1.dll release/Xsaitekpanels/win.xpl
if [ $? != 0 ] ; then
  exit
fi


make distclean >/dev/null
qmake -spec linux-g++-64 && make &&
cp plugin/liblin.xpl.so release/Xsaitekpanels/64/lin.xpl
if [ $? != 0 ] ; then
  exit
fi


make distclean >/dev/null
qmake -spec linux-g++-32 && make &&
cp plugin/liblin.xpl.so release/Xsaitekpanels/lin.xpl
if [ $? != 0 ] ; then
  exit
fi

#

